<?php

// Includes obligatorios
include ('./dbconfig.php');
include ('../Libraries/Tools/JLTools.class.php');

// Objeto JLTools
$jl = new JLTools();

//if(isset($_GET['id'])) $where = " WHERE tbl_users.int_id_user = '".$_GET['id']."'";

$SQL = "SELECT 
      tbl_logos.int_id_logo,
      tbl_logos.var_src,
      tbl_logos.var_title,
      tbl_logos.dat_creation,
      tbl_logos.var_size,
      tbl_partenaires.int_page,
      tbl_states.var_htmldesc
    FROM
      tbl_states
      INNER JOIN tbl_logos ON (tbl_states.int_id_state = tbl_logos.int_id_state)
      INNER JOIN tbl_partenaires ON (tbl_logos.id_int_partenaire = tbl_partenaires.id_int_partenaire)";
$campoId = "int_id_logo";

$jl->dataGridJSON($cnn, $SQL, $campoId, true);

// Cerrar la coneccion obligatorio
mysql_close($cnn);